package com.ruyuan.payment.pay.controller.admin;

import com.ruyuan.payment.server.resp.CommonResp;
import com.ruyuan.payment.server.service.BillService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/admin/bill")
public class AdminBillController {

    @Resource
    private BillService billService;

    @GetMapping("/do-alipay/{billDateStr}")
    public CommonResp doBillAliPay(@PathVariable String billDateStr) {
        billService.doBillAliPay(billDateStr);
        return new CommonResp();
    }

    @GetMapping("/do-wxpay/{billDateStr}")
    public CommonResp doBillWxPay(@PathVariable String billDateStr) {
        billService.doBillWxPay(billDateStr);
        return new CommonResp();
    }

}
